import React from 'react'
import { Cell, CellBody } from 'react-weui'
import { browserHistory } from 'react-router'

export default class ColumnItem extends React.Component {
	constructor(props) {
		super(props)
	}
	openProductInfo(key) {
        const storeId = this.props.storeId;
		browserHistory.push(`/store/${storeId}/products/id=${key}`);
	}
	render() {
        const { goodData } = this.props;
		return (
            <div style={{
            	border: '1px solid #F2F2F2',
            	width: '45%',
                padding: '14px 6px',
                float: 'left'
            }} onClick={this.openProductInfo.bind(this, goodData.goodsId)}>
                <img src={`http://${goodData.thumb}`} className="product-pic" />
                <p className="product-title">
                   {goodData.name}
                </p>
                <p style={{ color: 'orange' }}><span>￥</span>{goodData.price}</p>


		    </div>
		)
	}
}
